import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class HelloWorldJava {

    public static void main(String[] args) {

        String value = "Hello World";
        System.out.println(value);

        Integer num = 110;
        System.out.println(num);

        System.out.println("----------------------------------------");

        for(int i = 0; i < 5; i++){
            System.out.println(i);
        }

        System.out.println("----------------------------------------");

        ArrayList array = new ArrayList();
        array.add("Groovy");
        array.add("Java");
        array.add("Grails");
        System.out.println(array);

        for(Iterator iter = array.iterator(); iter.hasNext();){
            System.out.println(iter.next());
        }

        System.out.println("----------------------------------------");

        Map map = new HashMap();
        map.put("name", "Andy");
        map.put("VPN-#", 45);
        map.put("age", 18);
        System.out.println(map.get("name"));

        for(Iterator iter = map.entrySet().iterator(); iter.hasNext();){
            Map.Entry entry = (Map.Entry)iter.next();
            System.out.println(entry.getKey() + " : " + entry.getValue());
        }

        System.out.println("----------------------------------------");

        System.out.println(HelloWorldJava.plus(1, 2));
    }

    public static Integer plus(Integer n, Integer m) {
        return n + m;
    }

}